home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 April: System Software / Apple_Developer_Group_April_1994_System_Software_Edition.iso / What's New? / New System Software Extensions / Thread Manager Extension 2.0 / Read Me next >
Encoding:
Text File  |  1994-02-14  |  3.2 KB  |  33 lines  |  [ttro/ttxt]

  1. Greetings,
  2.  
  3. Well gang, the Thread Manager is now released as version 2.0. Licensing information for the Thread Manager 2.0 is included with this third release with the intent to make it as easy and as possible for developers to create and ship multithreaded applications.
  4.  
  5. Some important programming issues to remember when using the Thread Manager:
  6.  
  7. 1) The Resource Manager fix supports all machines except for the Mac Plus. On a Mac Plus only, the main thread should be the only thread which uses the Resource Manager. Specifically, calls to UpdateResFile or CloseResFile should only be made by the main application thread on a Mac Plus. All other Macintoshes support Resource Manager calls from any cooperative thread.
  8.  
  9. 2) It is considered a programming error to allocate memory, or cause memory to be allocated, during preemptive execution time or from any thread other than the main application thread before the MaxApplZone routine has been called. See Inside Macintosh Memory for information on using memory and expanding the application heap.
  10.  
  11. 3) One compatibility issue came up having to do with a utility library named GestaltValue developed by DTS. This utility makes using custom gestalt selectors easy and will someday be part of the system. Now for the problem: If the GestaltValueDispatch trap exists, the utility library will call through to it - unfortunately, the trap it checks for is ThreadDispatch rather than GestaltValueDispatch. Needless to say, a system runtime error occurs and your machine stops (read: you crash). The latest version of the GestaltValue utility has been updated to correct the problem. 
  12.  
  13. 4) The Power Thread Manager doesn't support preemptive threads.  You can only use cooperative threads with the Power Thread Manager.
  14.  
  15. 5) You can't use 680x0 and power threads in the same application.  A 680x0 application can only use 680x0 threads and a power application can only use power threads.  It is considered a programming error otherwise and not supported.
  16.  
  17. Compiling with the Power Thread Manager:
  18.  
  19. The information below is for use with the MPW based PowerPC compiler, found on the 'Macintosh on Risc SDK'.  This CD is purchasable through APDA, and at press time it's not known when it will be available for general release.
  20.  
  21. Included in the Compiler Stuff folder is an Interfaces folder and Libraries folder.  Inside the Interfaces folder you'll find a Threads.h.  This is a Universal header file (meaning can be used to compile both 680x0 and power applications).  Place this file in the PPCIncludes folder in your MPW folder (this assuming your set up for compiling power applications).  Inside the Libraries folder you'll find ThreadsLib.xcoff, this goes in the PPCLibraries folder.  In your makefile, you link against ThreadsLib.xcoff file, done as follows:
  22.  
  23.     PPCLink … "{PPCLibraries}"ThreadsLib.xcoff
  24.  
  25. Then add this line to your makepef command line inside your makefile:
  26.  
  27.     makepef … -l ThreadsLib.xcoff=ThreadsLib
  28.  
  29.  
  30. If you have any bug reports or comments, please don’t hesitate to link or write. You can contact us through the following:
  31. AppleLink: ERIC3, BPOST
  32. or place your comments in the Developer Talk bulletin boards on AppleLink, the internet, Compuserve, AOL, or some other public discussion area.
  33.